<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.*, entity.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <style type="text/css" media="all">
            @import url("../css/screen.css");
        </style>
    </head>
    <body>
        <%
        List books = Arrays.asList("hi", "hello", "bye");
        request.setAttribute("books", books);
        %>

        <display:table name="books">
        </display:table>

        <%
        String categoryID = request.getParameter("cat");
        if (categoryID != null) {
            List<entity.Book> book = BookService.getByCategory(categoryID);
            request.setAttribute("book2", book);
        }
        %>
        
        <display:table name="book2">
            <display:column property="bookID" title="ID" />
            <display:column property="name" />
            <display:column property="quantity" />
            <display:column property="statusCode" />
        </display:table>

    </body>
</html>
